import { http } from '../http'
import { weatherData, baiduData } from '@/types/conmonapi'

export const Test = {
  /**
   * 获取天气信息
   * @param city 城市,如:福建省
   * @returns
   */
  getWeatherDataApi: (city?: string) => {
    return http<weatherData>({
      method: 'get',
      url: `/weather`,
      data: {
        city: city,
      },
    })
  },
  /**
   *
   * @param size 一次请求返回的数据量
   * @returns
   */
  getBaiduDataApi: (size?: number) => {
    return http<baiduData>({
      method: 'get',
      url: `/baiduHot`,
      data: {
        size: size,
      },
    })
  },
}
